<?php
function UserSpread($xid){
$UserIp=UserIp();
$mysql_UserIp = mysql_query("SELECT * FROM xige_userip WHERE ip='$UserIp'");
$Ip=mysql_fetch_array($mysql_UserIp);

if ($Ip['ip']==""){
$mysql_spread = mysql_query("SELECT * FROM xige_info WHERE id='$xid'");
$spread= mysql_fetch_array($mysql_spread);
$spreadnum=$spread['spread']+1;
mysql_query("INSERT INTO xige_userip (id,ip) VALUES ('','$UserIp')");
mysql_query("update xige_info set spread='$spreadnum' where id='$xid'");
}

}
?>